/*
 * Copyright (c) 2013 WDCY Information Technology Co. Ltd
 * www.wdcy.cc
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * WDCY Information Technology Co. Ltd ("Confidential Information").
 * You shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement you
 * entered into with WDCY Information Technology Co. Ltd.
 */
package com.monkey.web.platform.service;

import com.monkey.core.domain.permission.Permission;
import com.monkey.core.plugin.dto.MonkeyDto;
import com.monkey.core.service.BaseService;
import com.monkey.core.web.response.MonkeyResponseDto;
import com.monkey.web.dto.request.permission.GrantPermissionRequestDto;

import java.util.Set;

/**
 * @author Wu Tianqiang
 */
public interface PermissionService extends BaseService<Permission, Long> {


    void addPermission(MonkeyDto monkeyDto);

    void modifyPermission(MonkeyDto monkeyDto);


    /**
     * 授权to user
     *
     * @param grantPermissionRequestDto
     * @return
     */
    MonkeyResponseDto grantPermissionToUser(GrantPermissionRequestDto grantPermissionRequestDto);

    /**
     * 查询出用户所拥有的权限
     *
     * @param userId
     * @return
     */
    Set<String> findStringPermissions(Long userId);
}